<template>
	<!-- 必到-首页 -->
	<view style="height: 100%;overflow-x: hidden;" class="shopDetails">
		<view class="wrap">
			<!-- 轮播图 -->
			<view @tap="jump_xc()" style="position: relative;">
				<u-swiper :list="list" bg-color="#ffffff" height="360"></u-swiper>
				<view
					style="border-radius: 20rpx; position: absolute;text-align: center; bottom: 20rpx;right: 80rpx; z-index: 10; width: 118rpx;height: 62rpx;background: #363636;opacity: 0.75;">
					<image style="width: 44rpx;height: 38rpx;margin-top:12rpx ;"
						src="../../../static/gx_img/xiangce.png"></image>
				</view>
			</view>
			<!-- 轮播图 end -->
			<view style="padding-left: 4%;margin: 14rpx 0 0 0 ;position: relative;">
				<view style="font-size: 34rpx;color: #323332;font-weight: 400; line-height: 50rpx;padding: 10rpx 0;">
					{{ shopdetails.name ? shopdetails.name :'' }}
				</view>
				<view class="boxs" style="position: absolute;right: 0rpx;bottom: 0rpx;">
					<view
						style="position: relative; border-radius: 30rpx 0px 0px 30rpx; width: 114rpx;height: 48rpx;line-height: 48rpx;display: flex;justify-content: center;align-items: center;background-color: #E9E9E9;">
						<view>
							<image
								style="width: 28rpx;height: 28rpx;display: flex;justify-content: center;align-items: center;"
								src="https://beedao.oss-cn-beijing.aliyuncs.com/69bf2f32c1494fd6a9809e4cfea9fb39.png">
							</image>
						</view>
						<view style="color: #8E8E8E;font-size: 22rpx;margin-left: 6rpx;">分享</view>
						<button open-type="share" class="getCodeView2"></button>
					</view>
				</view>
			</view>
			<view class="introduce" style="padding: 0 0 20rpx 0;">
				<view class="evaluate">
					<view>
						<u-rate :count="count" size="50rpx" inactive-icon="star-fill" inactive-color="#E4E4E4"
							v-model="shopdetails.score" :disabled="true" active-color="#FF6E3E"></u-rate>
						<text
							style="color: #FF6E3E;padding-left: 14rpx;font-size: 28rpx;">{{ shopdetails.score }}</text>
					</view>
					<view style="color: #8D8D8D;font-size: 28rpx;margin-left: 72rpx;">
						{{ shopdetails.totalAppraise || '0' }}条评价
					</view>
				</view>
				<view class="position">
					<view class="pos_postion" style="width: 78%;display: flex;" @tap="openMap">
						<view style="display: flex;align-items: center;justify-content: center;">
							<image style="width: 28rpx;height: 32rpx;"
								src="https://beedao.oss-cn-beijing.aliyuncs.com/3b31f65d078e46e5b3d30258b4859777.png"
								mode=""></image>
						</view>
						<view class="pos_time" style="color: #000000;width: 450rpx;margin-left: 8rpx;">
							{{ shopdetails.address || '' }}
						</view>
					</view>
					<view class="icons" style="width: 22%;">
						<view style="border-left: 1rpx solid #E4E4E4;height: 82rpx;"></view>
						<view @tap="callphone(shopdetails.contactsPhone)"
							style="width: 100%;text-align: center;margin-left: 10rpx;">
							<image style="width: 42rpx;height: 42rpx;"
								src="https://beedao.oss-cn-beijing.aliyuncs.com/f3e0a1e5983340088802de90d914349a.png"
								mode=""></image>
							<!-- <view >电话</view> -->
							<view style="height: 36rpx;"><button class="buttons"
									style="color: #000000!important;font-size: 26rpx;">联系客服</button></view>
						</view>
					</view>
				</view>
			</view>
		</view>
		<view style="width: 100%;height: 12rpx;background-color: #F5F5F5;" v-if="eventCoupons.length > 0"></view>
		<!-- 活动 -->
		<view style="width: 92%;margin: 0 auto;padding: 34rpx 0 32rpx 0;" v-if="eventCoupons.length > 0">
			<view
				style="display: flex;justify-content: space-between;color: #4E4E4E;font-size: 31rpx;font-weight: 500;">
				<view style="color: #4E4E4E;">活动</view>
				<view style="display: flex;" @click="goEventCoupons">
					<text style="color: #4E4E4E;">查看全部</text>
					<text style="color: #4E4E4E;">（共{{eventCoupons.length}}张）</text>
					<view style="display: flex;align-items: center;justify-content: center;">
						<u-icon name="arrow-right" color="#4E4E4E" size="26"></u-icon>
					</view>
				</view>
			</view>
			<view style="width: 100%; margin: 24rpx 0 0 0;">
				<view class="card_bj" style="position: relative;" v-if="did == 0" v-for="(att,did) in eventCoupons" :key="did">
					<image style="height:156rpx ;width: 100%;"
						src="https://beedao.oss-cn-beijing.aliyuncs.com/bd0d6b77b70e49f9a308762acc1e0ee4.png"></image>
					<view style="position: absolute;left: 0;top: 0;width: 100%;height:156rpx ;">
						<view style="width: 100%;display: flex;height:156rpx ;">
							<!-- 满减卷 -->
							<view
								style="width:21.5% ;text-align: center;display: flex;align-items: center;justify-content: center;">
								<view style="font-size:26rpx ;color: #EE0C00;line-height: 90rpx;height: 90rpx;width: 100%;border-right: 1rpx dashed #EE0C00;">
									{{att.counponsType == 1?"折扣卷":"优惠券"}}
								</view>
							</view>
							<view class=""></view>
							<!-- 已领取 -->
							<view style="width: 78.5%;float: right;display: flex;justify-content: space-between;">
								<view style="width: 90%;margin: auto;display: flex;justify-content: space-between;">
									<view style="display: flex;">
										<view
											style="color: #EE0C00;display: flex;align-items: center;justify-content: center;">
											<view v-if="att.counponsType == 0">
												<text style="font-size: 26rpx;">￥</text>
												<text style="font-size: 36rpx;">{{att.price}}</text>
											</view>
											<view v-if="att.counponsType == 1">
												<text style="font-size: 36rpx;">{{att.fmtDiscountStr}}</text>
											</view>
										</view>
										<view>
											<view class="card_text"
												style="color: #4E4E4E; font-size:24rpx ;padding: 0rpx 0rpx 0rpx 20rpx;line-height: 50rpx;">
												{{att.counponsType == 1?"必到专属":"必到专属：满100可用"}}
											</view>
											<view class="card_text"
												style="line-height: 50rpx;padding: 0rpx 0rpx 0rpx 20rpx;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;color: #4E4E4E;font-size: 24rpx;line-height: 34rpx;">
												有效期至{{att.endDatetime}}
											</view>
										</view>

									</view>
									<view
										style="color: #ffffff; display: flex;justify-content: center;align-items: center;">
										<view
											@click="att.isReceive == 0?getCoupons(att.couponsId,did):''"
											style="padding: 6rpx 24rpx;background-color: #EE0C00;border-radius: 30rpx;text-align: center;">
											{{att.isReceive == 0?'领取':'已领取'}}</view>
									</view>
								</view>
							</view>

						</view>
					</view>
				</view>
			</view>
		</view>
		<view style="width: 100%;height: 12rpx;background-color: #F5F5F5;  "></view>
		<!-- 活动结束 -->
		<!-- 服务预定 -->
		<view style="width: 92%;margin: 0 auto;padding: 34rpx 0 32rpx 0;" v-if="yuyue_list.length > 0">
			<view
				style="display: flex;justify-content: space-between;color: #4E4E4E;font-size: 31rpx;font-weight: 500;margin-bottom: 20rpx;">
				<view style="color: #4E4E4E;">服务预定</view>
			</view>
			<view style="width: 100%;">
				<scroll-view scroll-x="true" enhanced="true" show-scrollbar="false" scroll-with-animation="true"
					style="white-space: nowrap;display: flex;">
					<view v-for="(item, index) in yuyue_list" :key="index"
						@tap="jump_yu(item.businessId, item.chargeType, item.univalence, item.name)"
						style="padding: 20rpx 20rpx 30rpx 20rpx;margin-left: 15rpx; width: 210rpx;margin-top: 10rpx;display: inline-block;font-size: 26rpx;background-color: #FFF5F2;">
						<view style="width: 100%;text-align: center;color: #4E4E4E;line-height: 60rpx;">{{item.name}}
						</view>
						<view style="width: 100%;text-align: center;color: #EE0C00;line-height: 60rpx;">
							{{ item.univalence }}{{ item.univalenceUnit }}
						</view>
						<view style="display: flex;align-items: center;justify-content: center;margin-top: 10rpx;">
							<view
								style="color: #ffffff;background-color: #EE0C00;font-size: 22rpx;border-radius: 30rpx;padding: 12rpx 22rpx;">
								立即预约</view>
						</view>
					</view>
				</scroll-view>
			</view>
		</view>
		<view style="width: 100%;height: 12rpx;background-color: #F5F5F5;  "></view>
		<!-- 服务预定结束 -->
		<!-- 家政人员 -->
		<view style="width: 92%;margin: 0 auto;padding: 34rpx 0 32rpx 0;" v-if="entList.length > 0">
			<view
				style="display: flex;justify-content: space-between;color: #4E4E4E;font-size: 31rpx;font-weight: 500;margin-bottom: 20rpx;">
				<view>家政人员</view>
				<view @click="allPeople" style="display: flex;">
					<text>查看全部</text>
					<text style="color: #4E4E4E;">（共{{entTotal}}人）</text>
					<view style="display: flex;align-items: center;justify-content: center;">
						<u-icon name="arrow-right" color="#4E4E4E" size="26"></u-icon>
					</view>
				</view>
			</view>
			<view style="width: 100%;display: flex;">
				<view style="width: 23%;background-color: #F6F6F6;margin-right: 3%;text-align: center;padding: 16rpx 0;"
					v-for="(int, ind) in entList" :key="ind" v-if="ind < 4"
					@click="pepoleDetails(int.portrait, int.name, int.workExperience, int.business, int.score, int.employeeId, int.serviceType)">
					<image :src="int.portrait" style="width: 100rpx;height: 100rpx;border-radius: 50rpx;"
						mode="aspectFill"></image>
					<view style="display: flex;align-items: center;justify-content: center;margin-top: -18rpx;">
						<view
							style="background: linear-gradient(180deg, #FFF4D6 0%, #FFCE4A 100%);padding: 10rpx 20rpx;border-radius: 34rpx;color: #916500;font-size: 24rpx;">
							精选员工
						</view>
					</view>
					<view style="color: #5E5E5E;line-height: 48rpx;">{{ int.name }}</view>
					<view style="color: #653900;line-height: 40rpx;">评分{{int.score?int.score:0}}</view>
				</view>
			</view>
		</view>
		<!-- 家政人员结束 -->

		<!-- 团购 -->
		<view style="background-color: #F5F5F5;">
			<u-sticky offset-top="0">
				<scroll-view scroll-x="true" scroll-with-animation="true" class="tab-h" style="padding: 10rpx;"
					:scroll-left="scrollLeft">
					<view class="tab-item" :data-current="tid" @click="swichNav" v-for="(ite,tid) in lists">
						<view style="line-height: 60rpx;font-size: 34rpx;"
							:style="{color:currentTab==tid?'#EE0C00':'#4E4E4E'}">{{ite.title}}</view>
						<view :style="{color:currentTab==tid?'#FFFFFF':'#9E9E9E',
						'background-color':currentTab==tid?'#EE0C00':'#F5F5F5'
						}" style="line-height: 36rpx;border-radius: 30rpx;padding: 5rpx 14rpx;text-align: center;font-size: 28rpx;">
							{{ite.subtitle?ite.subtitle:"超值优惠"}}
						</view>
					</view>
				</scroll-view>
			</u-sticky>
			<view style="background-color: #F8F8F8 !important;min-height: 300rpx;">
				<view style="width: 95%;margin: 0 auto;" v-if="cateList.length > 0">
					<u-waterfall v-model="cateList" ref="uWaterfall">
						<template v-slot:left="{leftList}">
							<view class="demo-warter" @click="tuangouDetails(item.packageBusinessId)"
								v-for="(item, index) in leftList" :key="index">
								<u-lazy-load :threshold="20" duration="200" border-radius="10" height="auto"  :image="item.coverImage?item.coverImage:defaultImg"
									:index="index"></u-lazy-load>
								<view style="padding: 12rpx;border-bottom: 1rpx solid #EEEEEE;">
									<view class="demo-title" style="line-height: 40rpx;font-size: 27rpx;">
										{{item.name}}
									</view>
									<view class="demo-price"
										style="color: #F29423;line-height: 40rpx;font-size: 26rpx;">
										已售{{item.totalSale?item.totalSale:0}}丨评分{{item.score?item.score:0}}
									</view>
									<view style="display: flex;font-size: 26rpx;line-height: 40rpx;font-size: 26rpx;">
										<text style="color: #EE0C00;">{{item.unitPrice}}</text>
										<text
											style="color: #E4E4E4;text-decoration: line-through;margin-left: 12rpx;">原价{{item.showPrice}}</text>
									</view>
								</view>
							</view>
						</template>
						<template v-slot:right="{rightList}">
							<view class="demo-warter" @click="tuangouDetails(item.packageBusinessId)"
								v-for="(item, index) in rightList" :key="index">
								<u-lazy-load :threshold="20" duration="200"  border-radius="10" height="auto"  :image="item.coverImage?item.coverImage:defaultImg"
									:index="index"></u-lazy-load>
								<view style="padding: 12rpx;border-bottom: 1rpx solid #EEEEEE;">
									<view class="demo-title" style="line-height: 40rpx;font-size: 27rpx;">
										{{item.name?item.name:""}}
									</view>
									<view class="demo-price"
										style="color: #F29423;line-height: 40rpx;font-size: 26rpx;">
										已售{{item.totalSale?item.totalSale:0}}丨评分{{item.score?item.score:""}}
									</view>
									<view style="display: flex;font-size: 26rpx;line-height: 40rpx;font-size: 26rpx;">
										<text style="color: #EE0C00;">{{item.unitPrice}}</text>
										<text
											style="color: #E4E4E4;text-decoration: line-through;margin-left: 12rpx;">原价{{item.showPrice}}</text>
									</view>
								</view>
							</view>
						</template>
						<!-- <view class="look" v-if="tcnum > 0" @click="showTag">
							<view style="text-align: center;">
								{{ flag ? '收起' : tctext }}
								<u-icon name="arrow-down" style="margin-top: -18rpx;margin-left: 7rpx;" color="#9393AA"
									v-if="!flag" size="30"></u-icon>

								<u-icon name="arrow-up" style="margin-top: -18rpx;margin-left: 7rpx;" color="#9393AA"
									v-if="flag" size="30"></u-icon>
							</view>
						</view> -->
					</u-waterfall>
				</view>
				<view style="line-height: 200rpx;text-align: center;font-size: 28rpx;color: #999999;" v-else>
					没有更多了~
				</view>
			</view>
		</view>
		<!-- <view style="width: 100%;height: 12rpx;background-color: #F5F5F5;  "></view> -->

		<!-- 用户评价 -->
		<view style="width: 92%;margin: 0 auto;padding: 34rpx 0 32rpx 0;">
			<view
				style="display: flex;justify-content: space-between;color: #4E4E4E;font-size: 31rpx;font-weight: 500;margin-bottom: 20rpx;">
				<view>用户评价</view>
				<view @click="allEvaluate" style="display: flex;">
					<text style="color: #4E4E4E;margin-right: 8rpx;">查看全部评论</text>
					<view style="display: flex;align-items: center;justify-content: center;">
						<u-icon name="arrow-right" color="#4E4E4E" size="26"></u-icon>
					</view>
				</view>
			</view>
		</view>
		<!-- 评价列表 -->
		<view style="line-height: 200rpx;text-align: center;font-size: 28rpx;color: #999999;"
			v-if="appraiseList.length == 0">暂无相关评价~</view>
		<!-- appraiseList -->
		<!-- cateList -->
		<view v-for="(item, index) in appraiseList" :key="index" v-if="index < 4">
			<!-- <view class="introduce" style="border-bottom: 1px solid #F2F2F2;padding-top: 0;" @click="goDetail(item.appraiseId)"> -->
			<view class="introduce" style="border-bottom: 1px solid #F2F2F2;padding-top: 0;">
				<view class="pjList">
					<view class="curser" style="width: 100%;">
						<image :src="item.portrait" mode=""></image>
						<view class="yonghu" style="width: 82%;">
							<view class="yonghu_nam">
								<view class="yonghu_mcs">{{ item.nickName }}</view>
								<view class="yonghu_data">
									<!-- {{item.fmtCommentDatetime.slice(0,11)}} -->
									{{ item.fmtCommentDatetime }}
								</view>
							</view>
							<u-rate :count="count" v-bind:value.sync="item.formatScore" inactive-icon="star-fill"
								:disabled="true" active-color="#F29423" inactive-color="#E4E4E4"></u-rate>
							<text>{{ item.formatScore }}</text>
						</view>
					</view>
				</view>
				<view v-if="item.comments" class="pingyu">{{ item.comments || '' }}</view>
				<view class="pircture" v-if="item.images">
					<view v-for="(ite, uin) in item.images.split(',')" :key="uin"
						@click="clickPreview(item.images, uin)">
						<image :src="ite" mode=""></image>
					</view>
				</view>
			</view>
		</view>
		<view style="height: 150rpx;"></view>
		<view class="foot" style="padding-bottom: 28rpx;">
			<view style="height: 82rpx;width: 12%;" @click="updateCandidate(shopdetails.enterpriseId)">
				<image src="../../../static/img/1-39.png" mode="" style="width: 46rpx;height:46rpx;"
					v-if="shopdetails.isCollection == 0"></image>
				<image src="../../../static/img/star.png" mode="" style="width: 46rpx;height: 46rpx;"
					v-if="shopdetails.isCollection == 1"></image>
				<view style="font-size: 26rpx;color: #707070;height: 36rpx;line-height: 36rpx;"
					v-if="shopdetails.isCollection == 0">收藏</view>
				<view style="font-size: 26rpx;color: #707070;height: 36rpx;line-height: 36rpx;"
					v-if="shopdetails.isCollection == 1">已收藏</view>
			</view>
			<view style="height: 82rpx;">
				<view class="box">
					<image style="width: 46rpx;height: 46rpx;" src="../../../static/icon/share.png" mode=""></image>
					<button open-type="share" class="getCodeView"></button>
				</view>

				<view style="height: 36rpx;"><button open-type="share" style="color: #707070;"
						class="buttons">分享</button></view>
			</view>
			<view class="call" @click="callphone(shopdetails.contactsPhone)">电话咨询</view>
		</view>
		<u-toast ref="uToast" />
	</view>
</template>
<script>
	export default {
		data() {
			return {
				currentTab: 0, //预设当前项的值
				scrollLeft: 0, //tab标题的滚动条位置
				textStyle: {
					color: '#272755'
				},
				flag: false,
				list: [{
						image: 'https://cdn.uviewui.com/uview/swiper/1.jpg',
						title: '昨夜星辰昨夜风，画楼西畔桂堂东'
					},
					{
						image: 'https://cdn.uviewui.com/uview/swiper/2.jpg',
						title: '身无彩凤双飞翼，心有灵犀一点通'
					},
					{
						image: 'https://cdn.uviewui.com/uview/swiper/3.jpg',
						title: '谁念西风独自凉，萧萧黄叶闭疏窗，沉思往事立残阳'
					}
				],
				count: 5.0,
				value: 3.0,
				lists: [],
				current: 0,
				enterpriseId: '',
				arrays: [],
				cateId: '',
				cateList: [],
				appraiseList: [],
				total: '',
				shopdetails: '',
				entList: [],
				entTotal: 0,
				userId: '',
				yuyue_list: [],
				tcnum: '',
				tctext: '',
				hotId: '',
				eventCoupons:[],//活动优惠券
				defaultImg:"https://beedao.oss-cn-beijing.aliyuncs.com/618803010eda471a9a93ceda136dfe39.png",//默认商家图片
			};
		},
		onLoad(option) {
			if (option.hotId) {
				this.hotId = option.hotId;
			}

			this.enterpriseId = option.enterpriseId;
			// 获取商家详情
			this.getShopdetails();
			// 获取套餐分类
			this.getCategory();
			// 获取套餐列表
			this.packageList(1);
			//获取活动优惠券
			this.getCateList();
			// 获取评价列表
			this.getappraiseList();
			// 获取员工列表
			this.getentList();
			var userInfo = JSON.parse(uni.getStorageSync('userinfo'));
			this.userId = userInfo.userId;
			this.business_yuyue();
		},
		methods: {
			jump_yu(id, type, price, name) {
				uni.navigateTo({
					url: "../../placeOrder/selectService?businessId=" + id + "&enterpriseId=" + this.enterpriseId
				})
				// uni.navigateTo({
				// 	url:
				// 		'../../service/online_order2?enterpriseId=' +
				// 		this.enterpriseId +
				// 		'&chargeType=' +
				// 		type +
				// 		'&businessId=' +
				// 		id +
				// 		'&supId=0' +
				// 		'&titleName=' +
				// 		name +
				// 		'&name=' +
				// 		this.shopdetails.name +
				// 		'&isShop=' +
				// 		1
				// });
			},
			// 点击标题切换当前页时改变样式
			swichNav: function(e) {
				var cur = e.currentTarget.dataset.current;
				if (this.currentTaB == cur) {
					return false;
				} else {
					this.currentTab = cur;
				}
				this.checkCor();
				this.page = 1;
				if(this.$refs.uWaterfall){
					this.$refs.uWaterfall.clear(); 
				}
				
				this.cateId = this.lists[cur].packageCategoryId;
				this.packageList(1);
			},
			//判断当前滚动超过一屏时，设置tab标题滚动条。
			checkCor: function() {
				if (this.currentTab > 2) {
					this.scrollLeft = 280;
				} else {
					this.scrollLeft = 0;
				}
			},
			showTag() {
				this.flag = !this.flag;
				if (this.flag == true) {
					this.packageList(1);
				} else {
					this.packageList(1);
				}
			},
			jump_xc() {
				uni.navigateTo({
					url: './shoop_xcfm?enterpriseId=' + this.enterpriseId
				});
			},
			// 点击放大
			clickPreview(images, uin) {
				var imsList = images.split(',');
				uni.previewImage({
					current: uin,
					urls: imsList,
					indicator: 'default',
					loop: true
				});
			},
			// 去评价详情
			goDetail(appraiseId) {
				uni.navigateTo({
					url: './evaluationDetails/evaluationDetails?appraiseId=' + appraiseId
				});
			},
			getShopdetails() {
				let opts = {
					way: true, //true JSON请求；false 表单请求
					method: 'post',
					url: 'enterprise/detail'
				};
				let data = {
					enterpriseId: this.enterpriseId,
					businessId: this.hotId
				};
				this.http.httpTokenRequest(opts, data).then(res => {
					if ((res.code = 200)) {
						this.shopdetails = res.data;
						uni.setNavigationBarTitle({
							title: this.shopdetails.name
						})
						this.list = res.data.banners;
					} else {
						this.$refs.uToast.show({
							title: res.message,
							type: 'error'
						});
					}
				});
			},
			// 打开商家所在位置
			openMap() {
				var that = this;
				if (that.shopdetails.latitude) {
					var latitude = parseFloat(that.shopdetails.latitude);
					var longitude = parseFloat(that.shopdetails.longitude);
					var name = that.shopdetails.mapAddress;
					uni.openLocation({
						latitude: latitude,
						longitude: longitude,
						name: name,
						success: function() {
							console.log('success');
						}
					});
				} else {
					uni.showToast({
						icon: 'none',
						title: '该商家未设置店铺位置',
						mask: true,
						duration: 2000
					});
				}
			},

			// 获取套餐分类
			getCategory() {
				let opts = {
					way: true, //true JSON请求；false 表单请求
					method: 'post',
					url: 'package-business/category'
				};
				let data = {
					entId: this.enterpriseId
				};
				this.http.httpTokenRequest(opts, data).then(res => {
					if ((res.code = 200)) {
						// this.lists = res.data
						var arr = res.data;
						var array = [];
						arr.forEach(item => {
							item.packageCategoryId = item.packageCategoryId;
							array.push(item.packageCategoryId);
							// this.arrays.push(item)
						});
						this.arrays = array;
						this.lists = arr;
					} else {
						this.$refs.uToast.show({
							title: res.message,
							type: 'error'
						});
					}
				});
			},
			// 获取预约列表
			business_yuyue() {
				let opts = {
					way: true, //true JSON请求；false 表单请求
					method: 'post',
					url: 'enterprise/business'
				};
				let data = {
					enterpriseId: this.enterpriseId
				};
				this.http.httpTokenRequest(opts, data).then(res => {
					if ((res.code = 200)) {
						this.yuyue_list = res.data;
					} else {
						this.$refs.uToast.show({
							title: res.message,
							type: 'error'
						});
					}
				});
			},
			// 根据条件显示套餐列表
			packageList(num) {
				let opts = {
					way: true, //true JSON请求；false 表单请求
					method: 'post',
					url: 'enterprise/packageList'
				};
				let data = {
					entId: this.enterpriseId,
					categoryId: this.cateId,
					isAll: num
				};
				this.http.httpTokenRequest(opts, data).then(res => {
					if ((res.code = 200)) {
						this.cateList = res.data.records;
						if (res.data.total > 3) {
							this.tcnum = res.data.total - 3;
						} else {
							this.tcnum = 0;
						}
						this.tctext = '查看更多' + this.tcnum + '个套餐';
					} else {
						this.$refs.uToast.show({
							title: res.message,
							type: 'error'
						});
					}
				});
			},

			// 获取活动优惠券
			getCateList() {
				let opts = {
					way: true, //true JSON请求；false 表单请求
					method: 'post',
					url: 'enterprise/getEntActCouponsList'
				};
				let data = {
					enterpriseId: this.enterpriseId,
				};
				this.http.httpTokenRequest(opts, data).then(res => {
					if ((res.code = 200)) {
						var arr = res.data;
						arr.forEach((itee,index)=>{
							itee.endDatetime=itee.endDatetime.substring(0, 10)
						})
						this.eventCoupons = arr;
					} else {
						this.$refs.uToast.show({
							title: res.message,
							type: 'error'
						});
					}
				});
			},
			//去全部平台优惠券
			goEventCoupons(){
				uni.navigateTo({
					url:'../eventCoupons/eventCoupons?enterpriseId='+this.enterpriseId
				})
			},
			// 获取评价列表
			getappraiseList() {
				let opts = {
					way: true, //true JSON请求；false 表单请求
					method: 'post',
					url: 'appraise/package'
				};
				let data = {
					enterpriseId: this.enterpriseId,
					// packageBusinessId: this.cateId,
					page: 1,
					pageSize: 10
				};
				this.http.httpTokenRequest(opts, data).then(res => {
					if ((res.code = 200)) {
						this.appraiseList = res.data.records;
						this.total = res.data.total;
					} else {
						this.$refs.uToast.show({
							title: res.message,
							type: 'error'
						});
					}
				});
			},
			// 获取员工列表
			getentList() {
				var _this = this;
				let opts = {
					way: true, //true JSON请求；false 表单请求
					method: 'post',
					url: 'employee/entList'
				};
				let data = {
					page: 1,
					pageSize: 10,
					entId: _this.enterpriseId
				};
				_this.http.httpTokenRequest(opts, data).then(res => {
					if (res.code == 200) {
						_this.entList = res.data.records;
						_this.entTotal = res.data.total;
					} else {
						_this.$refs.uToast.show({
							title: res.message,
							type: 'error'
						});
					}
				});
			},
			// 收藏状态 套餐传3 商家1
			updateCandidate(enterpriseId) {
				var _this = this;
				let opts = {
					way: true, //true JSON请求；false 表单请求
					method: 'post',
					url: 'favorite/change'
				};
				let data = {
					type: 1,
					contentId: enterpriseId
				};
				_this.http.httpTokenRequest(opts, data).then(res => {
					if (res.code == 200) {
						_this.getShopdetails();
					} else {
						_this.$refs.uToast.show({
							title: res.message,
							type: 'error'
						});
					}
				});
			},
			// 分享到朋友圈
			onShareAppMessage(res) {
				if (res.from === 'button') {}
				let opts = {
					way: true, //true JSON请求；false 表单请求
					method: 'post',
					url: 'common/insertShareLog'
				};
				let data = {};
				this.http.httpTokenRequest(opts, data).then(res => {
					//分享日志，不需要处理
				});
				return {
					title: this.shopdetails.name,
					path: '/pages/login/login?id=' + this.userId + '&enterpriseId=' + this.enterpriseId + '&hotId=' + this
						.hotId + '&jumpType=' + 5
				};
			},
			// 套餐详情
			tuangouDetails(packageBusinessId) {
				uni.navigateTo({
					url: 'tuangouDetails/tuangouDetails?packageBusinessId=' + packageBusinessId +
						'&enterpriseId=' + this.shopdetails.enterpriseId
				});
			},
			// 套餐列表
			tuangouList() {
				uni.navigateTo({
					url: 'tuangouList/tuangouList?enterpriseId=' + this.enterpriseId
				});
			},
			//领取
			getCoupons(couponsId,index){
				var _this = this;
				var index = index;
				let opts = {
					way: true,
					method: 'post',
					url: 'coupon/receive/ent'
				};
				let data = {
					couponId:couponsId
				};
				_this.http.httpTokenRequest(opts, data).then(res => {
					if (res.code == 200) {
						uni.showToast({
							title: '领取成功',
							mask: true,
							icon: 'none',
							duration: 2000
						});
						_this.eventCoupons[index].isReceive=1;
					} else {
						uni.showToast({
							title: res.message,
							mask: true,
							icon: 'none',
							duration: 2000
						});
					}
				});
			},
			// 所有家政人员
			allPeople() {
				uni.navigateTo({
					url: 'allPeople/allPeople?enterpriseId=' + this.enterpriseId
				});
			},
			// 所有评价
			allEvaluate() {
				uni.navigateTo({
					url: 'allEvaluate/allEvaluate?cateId=' + this.cateId + '&enterpriseId=' + this.enterpriseId
				});
			},
			// 家政人员详情
			pepoleDetails(portrait, name, workExperience, business, score,employeeId,serviceType) {
				if(serviceType == 1){
					uni.navigateTo({
						url:'../matching/hisResume/hisResume?employeeId=' + employeeId + '&redirectId=' + business +'&imgs='+portrait +
						'&addType=2'
					})
				}else{
					uni.navigateTo({
						url: 'pepoleDetails/pepoleDetails?portrait=' + portrait + '&name=' + name +
							'&workExperience=' + workExperience + '&business=' + business + '&score=' + score
					});
				}
				
			},
			callphone(contactsPhone) {
				var _this = this;
				uni.makePhoneCall({
					phoneNumber: contactsPhone //仅为示例
				});
			}
		}
	};
</script>
<style>
	.shopDetails .u-load-more-wrap {
		padding: 30rpx 0;
	}
	.demo-warter .u-wrap {
		background-color: #FFFFFF !important;
		border-radius: 8rpx 8rpx 0 0 !important;
	}
	.shopDetails .u-lazy-item {
		border-radius: 8rpx 8rpx 0 0 !important;
	}
</style>
<style scoped lang="scss">
	.demo-warter {
		border-radius: 8px;
		margin: 12rpx;
		background-color: #ffffff;
		// padding: 8px;
		position: relative;
	}

	.wrap {
		padding: 0 !important;
		font-family: PingFang SC;
	}

	// .pircture{
	// 	overflow: hidden;color: #9393AA;
	// 	letter-spacing: 1rpx;
	// }
	.height_one {
		// height: 300rpx;
	}

	.cc_bottom {
		border-bottom: 1px solid #f5f5fe;
	}

	.active {
		height: auto;
		overflow: visible;
	}

	.look {
		display: flex;
		width: 100%;
		margin: 0 auto;
		margin-top: 34rpx;
	}

	.look view {
		text-align: center;
		margin: auto;
		width: 50%;
		color: #9393aa;
		font-size: 26rpx;
		margin-bottom: 20rpx;
		font-weight: 400;
	}

	.look image {
		width: 28rpx;
		height: 17rpx;
		margin: 10rpx 0 0 10rpx;
	}

	.introduce {
		width: 92%;
		margin: auto;
		padding: 34rpx 0rpx 32rpx 0rpx;
	}

	.tab-h {
		width: 100%;
		box-sizing: border-box;
		overflow: hidden;
		background: #F5F5F5;
		font-size: 30rpx;
		white-space: nowrap;
		z-index: 99;
	}

	.name {
		color: #363636;
		font-size: 38rpx;
		font-weight: 400;
	}

	.evaluate {
		display: flex;
		// justify-content: space-between;
		// border-bottom: 1px solid #E4E4E4;
		// padding-bottom: 34rpx;
		// margin-top: 28rpx;
		font-size: 30rpx;
		align-items: center;
		padding-bottom: 20rpx;
		border-bottom: 1rpx solid #F2F2F2;
	}

	.status {
		font-size: 30rpx;
		display: flex;
		margin-top: 16rpx;
		// align-items:flex-start;
		//     justify-content: center;
	}

	.status_shop {
		width: 96rpx;
		height: 36rpx;
		// background: linear-gradient(175deg, #FFB940 0%, #FF0000 100%);
		// opacity: 0.85;
		// font-size: 28rpx;
		// line-height: 36rpx;
		// border-radius: 18rpx 18rpx 18rpx 0rpx;
		// color: #FFFFFF;

		text-align: center;
	}

	.timeData {
		color: #000000;
		font-size: 30rpx;
		padding-left: 24rpx;
	}

	.position {
		display: flex;
		align-items: center;
		justify-content: space-between;
		margin-top: 18rpx;
	}

	.pos_postion {
		font-size: 30rpx;
	}

	.pos_shop {
		color: #272755;
		font-weight: bold;
	}

	.pos_time {
		color: #9393aa;
		// margin-top: 8rpx;
	}

	.icons {
		display: flex;
		color: #9393aa;
		font-size: 26rpx;
	}

	.shares {
		text-align: center;
		padding-right: 22rpx;
	}

	.icons image {
		width: 38rpx;
		height: 38rpx;
	}

	.phone {
		text-align: center;
		padding-left: 22rpx;
	}

	.taocan {
		display: flex;
		width: 100%;
		margin: auto;
		// margin-top: 58rpx;
		align-items: center;
		justify-content: space-between;
	}

	.taungou {
		display: flex;
		align-items: center;
	}

	.tab-item {
		margin: 0 36rpx;
		display: inline-block;
	}

	.tab-content {
		margin-top: 80rpx;
		min-height: 800rpx;
	}

	.taungou image {
		width: 40rpx;
		height: 40rpx;
	}

	.taungou text {
		padding-left: 6rpx;
		font-size: 38rpx;
		color: #3f3f3f;
		font-weight: 400;
	}

	.danbao {
		display: flex;
		align-items: center;
		color: #9393aa;
		font-size: 26rpx;
	}

	.pingtai {
		// margin-right: 36rpx;
		display: flex;
		align-items: center;
	}

	.pingtai image {
		width: 25rpx;
		height: 25rpx;
	}

	.pingtai text {
		padding-left: 10rpx;
	}

	.lists {
		padding: 40rpx 0 24rpx 0;
		display: flex;
		border-bottom: 1px solid #e8e8f6;
	}

	.lists .img {
		width: 122rpx;
		height: 122rpx;
		background: #e4e4e4;
	}

	.lists .right {
		width: 78%;
		padding-left: 30rpx;
	}

	.right .texts {
		font-size: 30rpx;
		// font-weight: bold;
		color: #3f3f3f;
	}

	.right .nums {
		display: flex;
		justify-content: space-between;
		align-items: center;
		// padding-left: 10rpx;
		margin-top: 38rpx;
	}

	.boxs {
		text-align: center;
		width: 114rpx;
		height: 48rpx;
		display: inline-block;
		position: relative;
	}

	.getCodeView2 {
		display: inline-block !important;
		padding: 0 !important;
		width: 120rpx !important;
		margin-right: 0;
		height: 100rpx;
		line-height: 100rpx;
		padding-right: 0rpx;
		z-index: 11;
		opacity: 0;
		position: absolute;
		left: 0;
	}

	.getCodeView {
		display: inline-block !important;
		padding: 0 !important;
		width: 114rpx !important;
		margin-right: 0;
		height: 60rpx;
		line-height: 60rpx;
		padding-right: 0rpx;
		z-index: 11;
		opacity: 0;
		position: absolute;
		left: 0;
	}

	.nums .money {
		display: flex;
		font-size: 26rpx;
	}

	.money .jiage {
		color: #f29423;
		font-size: 26rpx;
	}

	.jiage text {
		font-size: 36rpx;
	}

	.money .yuanjia {
		color: #ceced1;
		text-decoration: line-through;
		margin-top: 10rpx;
	}

	.nums .yishou {
		color: #9393aa;
		font-size: 26rpx;
	}

	.pjList {
		display: flex;
		margin-top: 24rpx;
	}

	.curser {
		display: flex;
		align-items: center;
	}

	.curser image {
		width: 94rpx;
		height: 94rpx;
		border-radius: 50%;
	}

	.yonghu {
		margin-left: 26rpx;
	}

	.yonghu text {
		color: #f29423;
	}

	.yonghu_nam {
		display: flex;
		align-items: center;
		margin-bottom: 8rpx;
	}

	.yonghu_mcs {
		color: #363636;
		font-size: 30rpx;

		width: 45%;
		overflow: hidden;
		white-space: nowrap;
		text-overflow: ellipsis;
	}

	.yonghu_data {
		font-size: 26rpx;
		color: #9393aa;
		font-weight: 500;
		width: 55%;
		text-align: right;
	}

	.pingyu {
		margin-top: 26rpx;
		color: #9393aa;
		font-size: 26rpx;
	}

	.pircture {
		display: flex;
		padding: 32rpx 0 0 0;
	}

	.pircture view {
		padding-right: 24rpx;
	}

	.pircture image {
		width: 152rpx;
		height: 158rpx;
	}

	.taocao_ayi {
		display: flex;
		padding: 26rpx 0 0 0;
	}

	.taocans {
		padding-right: 40rpx;
	}

	.taocans image {
		width: 122rpx;
		height: 122rpx;
	}

	.taocans view {
		text-align: center;
	}

	.foot {
		position: fixed;
		z-index: 99;
		background-color: #ffffff;
		bottom: 0;
		width: 100%;
		display: flex;
		align-items: center;
		justify-content: space-around;
		text-align: center;
		font-size: 26rpx;
		color: #707070;
		padding: 10rpx 0;
	}

	.foot image {
		width: 50rpx;
		height: 50rpx;
	}

	.call {
		width: 458rpx;
		height: 82rpx;
		background-color: #ffb41e;
		color: #ffffff;
		font-size: 38rpx;
		font-weight: bold;
		line-height: 78rpx;
		border-radius: 4rpx;
		text-align: center;
	}

	.more {
		text-align: center;
		font-size: 30rpx;
		color: #9393aa;
		margin-top: 26rpx;
	}

	.more image {
		width: 28rpx;
		height: 17rpx;
		margin-left: 14rpx;
	}

	.buttons {
		// width: 28rpx;
		// height: 19rpx;
		background: none;
		color: #707070;
		height: 36rpx;
		line-height: 36rpx;
		padding: 0;
		font-size: 26rpx;
	}

	.buttons::after {
		border: none;
	}

	.box {
		width: 46rpx;
		height: 46rpx;
		display: inline-block;
		position: relative;
	}

	.box image {
		position: absolute;
		left: 0;
		width: 46rpx;
		height: 46rpx;
		z-index: 10;
	}

	.getCodeView {
		display: inline-block !important;
		padding: 0 !important;
		width: 46rpx !important;
		margin-right: 0;
		height: 46rpx;
		line-height: 36rpx;
		padding-right: 0rpx;
		z-index: 11;
		opacity: 0;
		position: absolute;
		left: 0;
	}
</style>
